package cn.hsw.platform.core.doc.exception;

import cn.hsw.platform.core.enums.HttpEnum;

/**
 * 权限异常
 * @author 李子木
 * @date 2020-11-06
 */
public class NotFoundException extends RuntimeException {

    private static final long serialVersionUID = -5529080221946193358L;
    private int code;

    public NotFoundException(){
        super(HttpEnum.NOT_FOUND.getMsg());
        this.code = this.code = HttpEnum.NOT_FOUND.getCode();
    }

    public NotFoundException(String message) {
        super(HttpEnum.NOT_FOUND.getMsg()+","+message);
        this.code = HttpEnum.NOT_FOUND.getCode();
    }

    public NotFoundException(int code, String message) {
        super(message);
        this.code = code;
    }

    public int getCode(){
        return this.code;
    }
}
